/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package cn.ekuma.data.ui.swing;

import cn.ekuma.data.dao.ChildEditorRecord;
import cn.ekuma.data.dao.I_ParentNode;

import com.openbravo.data.user.DirtyManager;

/**
 *
 * @author Administrator
 */
public abstract class AbstractChildDAOJEditor<T,K> extends AbstractDAOJEditor<T> implements ChildEditorRecord<T>,ParentNodeChangeListener<K>{
    
    protected I_ParentNode<K> parentNode;
    protected int parentState;

    public AbstractChildDAOJEditor(DirtyManager dirty) {
        super(dirty);
    }

    public I_ParentNode<K> getParentNode() {
        return parentNode;
    }

    public void parentNodeValueChange(int state, I_ParentNode<K> parent) {
        this.parentState=state;
        this.parentNode=parent;
    }
    
    public void setParentNode(I_ParentNode<K> parentNode) {
        this.parentNode = parentNode;
    }

    public int getParentState() {
        return parentState;
    }

    public void setParentState(int parentState) {
        this.parentState = parentState;
    }
}
